import java.util.UUID;
import com.gmongo.GMongo

import com.db.Config
def mongo = new GMongo(Config.dbip,Config.dbport)
def db = mongo.getDB(Config.dbname)

//获取需要发送的Email，用户名称,发送标题,发送的内容
def  message =[
		sendto:request.getParameter('sendto'), 
		username:request.getParameter('username'),
		subject:request.getParameter('subject'), 
		content:request.getParameter('content'),
		key:UUID.randomUUID().toString()
		]
println message+[state:1]
db.(Config.NEED_SEND_EMAIL_MESSAGE).insert(message)














